package com.itheima.homework01.setdemo02;

import java.util.HashSet;
import java.util.Set;

public class SetTest2 {
    public static void main(String[] args) {
        Student stu1 = new Student("张三","男",20);
        Student stu2 = new Student("李四","女",21);
        Student stu3 = new Student("张三","男",20);
        Set<Student> set = new HashSet<>();
        set.add(stu1);
        set.add(stu2);
        set.add(stu3);
        for (Student s : set) {
            System.out.println(s);
        }
    }
}
